import { http } from '@/utils/http'

// 获取到承诺书是否勾选的状态
export const getCommitStatus = (id: string) => {
  try {
    return http({
      method: 'GET',
      url: `/get/api/v1/develop/activity/of_commitment`,
      data: {
        u_id: id,
      },
    })
  } catch (err) {
    console.log(err)
  }
}

// 修改承诺书的是否勾选的状态
export const setCommitStatus = (id: string, flag: boolean) => {
  try {
    return http({
      method: 'POST',
      url: '/get/api/v1/develop/cacommitment',
      data: {
        u_id: id,
        flag: flag,
      },
    })
  } catch (err) {
    console.log(err)
  }
}
